
<script type="text/javascript">
$(document).ready(function() {

	//$("#addclient").submit(function(e){
		$('#addclient').validate({
			submitHandler: function(form) {
				$.ajax({
						type: "POST",
						data: $('#addclient').serialize(),
						url: $('#addclient').attr('action'),
						beforeSend: function() {
							$("#submitclient").after("<img id='wait' style='margin:0;float:right;'  src='<?=$this->config->item('images').'loading.png';?>' />");
						},
						success: function(msg) {
							$("#wait").remove();	
							$('#content').load('<?=base_url('admin/home/listclient')?>');	
						}
					});
					return false;
				}
		});
	//});
	//$("#addclient").validate({});
	
	//if($("#form_id").valid({})){

				
					
		
	//}
})
</script>
<form id="addclient" method="post" action="<?=base_url('admin/home/addclient')?>">
   <div id="info-client">
     <div class="data">
       <table width="100%">
          <tr>
             <td><label>CLIENT NAME</label></td>
             <td><input  class="required" type="text" value="" name="client_name" /></td>
          </tr>
          <tr>
             <td><label>REFERENCE NUMBER</label></td>
             <td><input class="required" type="text" value="" name="reference_number" /></td>
          </tr>
          <tr>
             <td><label>BUSINESS SECTOR</label></td>
             <td><input class="required" type="text" value="" name="busines_sector" /></td>
          </tr>
          <tr>
             <td><label>RISK RANKING</label></td>
             <td><input class="required" type="text" value="" name="risk_ranking" /></td>
          </tr>
          <tr>
             <td><label>DATA SEARCH INITIATED</label></td>
             <td><input class="required" type="text" value="" name="data_search_initiated" /></td>
          </tr>
          <tr>
             <td><label>DATA SEARCH COMPLETED</label></td>
             <td><input class="required" type="text" value="" name="data_search_completed" /></td>
          </tr>
          <tr>
             <td><label>SIGN OFF BY</label></td>
             <td><input class="required" type="text" value="" name="sign_off_by" /></td>
          </tr>
       
       </table>
      </div>
   </div>
	<input type="submit" value="Submit" id="submitclient" />
   </form>